package com.ysxsoft.wdg.adapter.my;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.bean.MyJfBean;
import com.ysxsoft.wdg.util.ViewUtils;

public class JfGoodsAdapter extends BaseQuickAdapter<MyJfBean.ShopBean,BaseViewHolder> {


    public JfGoodsAdapter(int layoutResId) {
        super(layoutResId);
    }

    public void clear(){
        getData().clear();
        notifyDataSetChanged();
    }


    @Override
    protected void convert(BaseViewHolder helper, MyJfBean.ShopBean item) {

        helper.setText(R.id.tv_name,item.getName());
        helper.setText(R.id.tv_jf,"积分："+item.getScore());
        ViewUtils.loadImage(mContext,item.getPic(), (ImageView) helper.getView(R.id.iv_pic));
    }
}
